Skip to content

fix: prevent mypyc async exception segfault - #692

Merged
cofin merged 2 commits into
mainfrom
fix/691-mypyc-async-exception-segfault
Aug 8, 2026
Merged

fix: prevent mypyc async exception segfault#692
cofin merged 2 commits into
mainfrom
fix/691-mypyc-async-exception-segfault

Conversation

@cofin

@cofin cofin commented Aug 8, 2026

Copy link
Copy Markdown
Member

What changed

  • isolate cursor lifecycle handling from the async database exception mapper in compiled driver frames
  • preserve SQLSpecError translation for aiosqlite statement failures without removing sqlspec.driver._async from mypyc compilation
  • add subprocess-based installed-wheel smoke coverage for select and execute error paths
  • install aiosqlite in wheel smoke jobs and document the fix

Closes #691

@codecov-commenter

codecov-commenter commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.34884% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.37%. Comparing base (2bff62d) to head (2e7bedd).

Files with missing lines Patch % Lines
sqlspec/driver/_async.py 95.34% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #692      +/-   ##
==========================================
+ Coverage   77.35%   77.37%   +0.01%     
==========================================
  Files         476      476              
  Lines       68193    68211      +18     
  Branches     9385     9385              
==========================================
+ Hits        52751    52778      +27     
+ Misses      12033    12026       -7     
+ Partials     3409     3407       -2     
Flag Coverage Δ
integration 60.89% <95.34%> (+0.02%) ⬆️
py3.10 75.69% <94.18%> (+0.02%) ⬆️
py3.11 75.70% <94.18%> (+0.01%) ⬆️
py3.12 75.70% <95.34%> (+0.02%) ⬆️
py3.13 75.70% <95.34%> (+0.01%) ⬆️
py3.14 76.58% <95.34%> (+0.01%) ⬆️
unit 64.95% <37.20%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sqlspec/driver/_async.py 80.70% <95.34%> (+2.51%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cofin cofin changed the title fix(#691): prevent mypyc async exception segfault fix: prevent mypyc async exception segfault Aug 8, 2026
@cofin
cofin marked this pull request as ready for review August 8, 2026 22:19
@cofin
cofin merged commit 0adde96 into main Aug 8, 2026
27 checks passed
@cofin
cofin deleted the fix/691-mypyc-async-exception-segfault branch August 8, 2026 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: mypyc async driver segfaults on aiosqlite statement errors

2 participants